<div id="auto_service_header">
    <div id="auto_service_nav">
        <ul>
            <li><a <?php echo ($_GET['t'] === 'cgc' ? 'class="auto_service_nav_clicked"' : '');?> href="?p=dealer_search&t=cgc">Car Grooming Centers</a></li>
            <li><a <?php echo ($_GET['t'] === 'cc' ? 'class="auto_service_nav_clicked"' : '');?> href="?p=dealer_search&t=cc">Cars Customization</a></li>
            <li><a <?php echo ($_GET['t'] === 'asc' ? 'class="auto_service_nav_clicked"' : '');?> href="?p=dealer_search&t=asc">Auto Service Centers</a></li>
        </ul>
    </div>
</div>
<!-- WEB CONTENT -->
<div id="container_content">
    <div id="auto_service_center_holder">
        
        <div id="dealer_search">
            <form action="?p=dealer_search" method="GET">
                <input type="hidden" name="p" value="dealer_search" />
                <input type="hidden" name="t" value="<?php echo (isset($_GET['t']) ? $_GET['t'] : '');?>" />
            <ul>
                <li>
                    <div id="dealer_search_name" class="bigger_input">
                        <h2>Name</h2>
                        <label for="dealer_name"></label>
                        <input type="text" name="dealer_name" id="dealer_name" value="<?php echo (isset($_GET['dealer_name']) ? $_GET['dealer_name'] : '');?>" />
                    </div>
                </li>
                <li>
                <li>
                    <div id="dealer_search_city" class="bigger_input">
                        <h2>City</h2>
                        <label for="dealer_city"></label>
                        <input type="text" name="dealer_city" id="dealer_city" value="<?php echo (isset($_GET['dealer_city']) ? $_GET['dealer_city'] : '');?>" />
                    </div>
                </li>
                <li>
                    <h2>State</h2>
                    <label for="dealer_state"></label>
                    <select id="dealer_state" name="dealer_state" class="select_style_main_page" style="width:250px; height:25px">
                        <option value="">-- select --</option>
                        <?php
                        foreach ($data->lists['states'] as $v) {
                            if($v == $_GET['dealer_state']) {
                                echo "<option value='".$v."' selected>${v}</option>";
                            } else {
                                echo "<option value='".$v."'>${v}</option>";
                            }
                        }
                        ?>
                    </select>
                </li>
            </ul>
            <div id="filter_button">
            <input src="img/filter.png" type="image">
            </div>
            </form>
        </div>
  
        <table border="">
            <tr>
                <th>Auto Service Center</th>
                <th>Auto Service Center Name</th>
                <th>City</th>
                <th>State</th>
                <th>Phone</th>
                <th>Email</th>
            </tr>

            <?php
            if(!empty($data->dealer_list)) {
                foreach ($data->dealer_list as $k => $v) {
                    echo '
                <tr class="'.($k%2 ? 'not_colored' : 'colored').'">
                    <td>
                        <div class="table_images">
                            <img src="'.$v['logo'].'" alt="" />
                        </div>
                    </td>
                    <td>'.$v['company_name'].'</td>
                    <td>'.$v['city'].'</td>
                    <td>'.$v['state'].'</td>
                    <td>'.$v['phone'].'</td>
                    <td>'.$v['email'].'</td>
                </tr>';
                }
            }
            ?>

        </table>
    </div>
</div>